package com.nox.trademe.testapp.models;

import android.os.Parcel;
import android.os.Parcelable;

public class Item implements Parcelable {

    private String itemID;
    private String name;
    private String categoryNumber;
    private String picture;
    private String price;

    public Item(String itemID, String name, String categoryNumber, String picture, String price) {
        this.itemID = itemID;
        this.name = name;
        this.categoryNumber = categoryNumber;
        this.picture = picture;
        this.price = price;
    }

    public Item(Parcel in) {
        this.itemID = in.readString();
        this.name = in.readString();
        this.categoryNumber = in.readString();
        this.picture = in.readString();
        this.price = in.readString();
    }

    public static final Parcelable.Creator<Item> CREATOR =
            new Parcelable.Creator<Item>() {
                public Item createFromParcel(Parcel in) { return new Item(in);}
                public Item[] newArray(int size) { return new Item[size]; }
            };

    public String getItemID() {
        return itemID;
    }

    public void setItemID(String itemID) {
        this.itemID = itemID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCategoryNumber() {
        return categoryNumber;
    }

    public void setCategoryNumber(String categoryNumber) {
        this.categoryNumber = categoryNumber;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel destination, int flags) {
        destination.writeString(itemID);
        destination.writeString(name);
        destination.writeString(categoryNumber);
        destination.writeString(picture);
        destination.writeString(price);
    }
}
